<li>
  <label for="name"><?php echo $this->lang->line('label.category.name') ?><span>*</span></label>
  <div class="input"><input type="text" id="name" value="<?php echo empty($obj["name"]) ? "" : $obj["name"] ?>" name="name">
  </div>
</li>
<li>
  <label for="parent_id"><?php echo $this->lang->line('label.category.parent_id') ?></label>
  <div class="input">
    <select id="parent_id" name="parent_id" class="chzn chzn-done" style="visibility: visible;">
      <option value="0">
        <?php echo $this->lang->line('label.option.select') ?>
      </option>
      <?php
      $ref_objs = $this->category_model->get_all_tree(0, 0, empty($obj['id']) ? array() : $obj['id']);
      foreach ($ref_objs as $ref) {
        ?>
        <option value="<?php echo $ref["id"] ?>"
                <?php echo empty($obj["parent_id"]) || $obj["parent_id"] != $ref["id"] ? "" : 'selected="selected"' ?>>
                  <?php echo $this->category_model->to_string($ref) ?>
        </option>
      <?php } ?>
    </select>
  </div>
</li>
<li>
  <label for="order"><?php echo $this->lang->line('label.category.order') ?></label>
  <div class="input">
    <input type="text" id="order" 
           value="<?php echo empty($obj["order"]) ? "" : $obj["order"] ?>" name="order">
  </div>
</li>
<li>
  <label for="avatar">
    <?php echo $this->lang->line('label.category.avatar') ?></label>
  <div class="input">
    <input type="file" id="avatar" name="avatar">
  </div>
</li>
<?php if(!empty($obj['avatar'])) { ?>
<li>
  <label for="thumbnail">&nbsp;</label>
  <div class="input">
    <img width="200px" alt="avatar"
         src="<?php echo site_url('admin/file_upload/get_img_from_path?path='.
                 $this->router->fetch_class().'/'.$obj['avatar'])?>" />
  </div>
</li>
<?php } ?>
